<%@ include file="/jsp/common/tagLibs.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/admin/surveyDetails.js"></script>
<DIV class=content_division>
	<DIV class=content_container>
	<DIV class=cleardiv></DIV>
		<DIV class=content_left_shadow>
			<DIV class=content_right_shadow>
				<DIV class=under_flash_shadow></DIV>
				<!-- CONTENT START -->
				<DIV class=content_inner_container>
						   <form:form id="columnarForm" commandName="surveyAnswersVO">				
							<DIV class=cleardiv></DIV>
							<DIV class=maincol style="width:100%;">
							<DIV class=button_orange>
								<DIV class=bo_left></DIV>
								<DIV class=bo_mid>Survey</DIV>
								<DIV class=bo_right></DIV>
							</DIV>
							<div class="copyright_container" ><p align="left">1 - Excellent, 6 - Poor</p></div>
							<DIV class=cleardiv></DIV>
							<div style="margin-top:20px;">
								<c:if test="${ not empty surveyAnswersVO.surveyAnswers }">							
								<table class="table-css">
									<thead>
										<tr><th width="5%">S.No.</th><th width="60%">Questions</th><th width="5%">1</th><th width="5%">2</th><th width="5%">3</th><th width="5%">4</th><th width="5%">5</th><th width="5%">6</th><th width="5%">NA</th><th width="25%">Comments</th></tr>
									</thead>
									<tbody>
										<tr>
										<td colspan="10" align="center" style="font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: 600">${surveyAnswersVO.topicName}
										</td>
										</tr>
									<c:forEach items="${surveyAnswersVO.surveyAnswers}" var="surveyAnswer" varStatus="status">						
										<tr style="height:50px;">
										<td>
							   			${status.count}									
										</td><td>${surveyAnswer.questionDesc}</td>
										
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="1" ${surveyAnswer.answercode == 1 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="2" ${surveyAnswer.answercode == 2 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="3" ${surveyAnswer.answercode == 3 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="4" ${surveyAnswer.answercode == 4 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="5" ${surveyAnswer.answercode == 5 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="6" ${surveyAnswer.answercode == 6 ?'checked':'' }/></td>
										<td><input type="radio" name="surveyAnswers[${status.index}].answercode" value="0" ${surveyAnswer.answercode == 0 ?'checked':'' }/>
										<input type="hidden" name="surveyAnswers[${status.index}].surveyquestionid" value="${surveyAnswer.surveyquestionid}" />
										</td>	
										<td>
										<textarea name="surveyAnswers[${status.index}].answerdescription" id="surveyAnswers[${status.index}].answerdescription"  cols="30" rows="3" class="input jFocus" style="height:60px;padding:5px;"><c:out value="${surveyAnswer.answerdescription}" /></textarea>
										</td>																			
										</tr>
									</c:forEach>
									</tbody>
								</table>
								</c:if>
								<input type="hidden" name="previousTopicID" value="${surveyAnswersVO.previousTopicID}" />
								<input type="hidden" name="currentTopicID" value="${surveyAnswersVO.currentTopicID}" />
								<input type="hidden" name="nextTopicID" value="${surveyAnswersVO.nextTopicID}" />
								<input type="hidden" name="surveyID" value="${surveyAnswersVO.surveyID}" />																																
								<input type="hidden" name="previousButtonClicked" id="surveyAnswersVO_previous" />
								<input type="hidden" name="finishButtonClicked" id="surveyAnswersVO_finish" />
								
							</div>
							</div>
							<DIV class=cleardiv></DIV>
							<div>
								<label for="city1">
									<input type="hidden" name="validation" id="validation"/>
								</label>	
							</div>
							<div>
								<c:if test="${surveyAnswersVO.previousTopicID != 0}">
									<div>
    									<input value="&lt; Previous" type="submit" class="button" id="previousBtn"/>
    								</div>
    							</c:if> 
    							<div align="right">
									<c:if test="${surveyAnswersVO.nextTopicID != 0}">
										<input value="Next &gt;" type="submit" class="button" id="nextBtn"/>
									</c:if>
									<c:if test="${surveyAnswersVO.nextTopicID == 0}">
										<input value="Finish" type="submit" class="button" id="finishBtn"/>
									</c:if>
								</div>
							</div>
							<div>
								<input value="Cancel" type="submit" class="button" id="cancelsurveyBtn"/>
							</div>
							<DIV class=cleardiv></DIV>
							</form:form>   
							<br/><br/><br/>
						</DIV>
				<!-- CONTENT END -->
			</DIV>
		</DIV>
		<DIV class=cleardiv></DIV>
	</DIV>
</DIV>